package main
import (
	"fmt"
	"github.com/hyperledger/fabric/core/chaincode/shim"
	pb "github.com/hyperledger/fabric/protos/peer"
)
type fabric_study1 struct {

}
func (t *fabric_study1) Init(stub shim.ChaincodeStubInterface) pb.Response {
	fmt.Println(" <<  ========  study1 ==========  >> ")
	return shim.Success([]byte("success init "))
}
func (t *fabric_study1) Invoke(stub shim.ChaincodeStubInterface) pb.Response {
	function,args := stub.GetFunctionAndParameters()
	var a_parm = args[0]


	fmt.Println("  ========  mytest   ========== ")
	fmt.Printf(" parm is  %s  \n " , a_parm ,function)
}
func main(){
	err := shim.Start(new(fabric_study1))
	if err != nil {
	fmt.Printf("Error starting Simple chaincode: %s", err)
	}
}
